<template>
  <el-dialog title="数据查看" :visible.sync="formViewData.isShow" width="35%">
    <div class="title">{{ info.name }}</div>
    <div class="serialNumber">{{ info.activityNum }}</div>
    <div style="margin-top:10px">
      活动时间 : {{ info.activityStartTime }} <span>至</span
      >{{ info.activityEndTime }}
    </div>
    <div class="activeInfo">
      <div class="activeInfoItem">
        <p>参与量</p>
        <strong>{{ info.participateCount }}</strong>
      </div>
      <div class="activeInfoItem">
        <p>领取量</p>
        <strong>{{ info.receiveCount }}</strong>
      </div>
      <div class="activeInfoItem">
        <p>已赠商品数</p>
        <strong>{{ info.productsCount }}</strong>
      </div>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="formViewData.isShow = false">取 消</el-button>
      <el-button type="success" @click="formViewData.isShow = false">
        确认
      </el-button>
    </span>
  </el-dialog>
</template>

<script>
import { getGivingCoursesStatistics } from '@/api/activityCenter/activityManage/giveLessons'
export default {
  props: ['formViewData'],
  data() {
    return {
      info: {}
    }
  },
  mounted() {
    const { id } = this.formViewData.params
    getGivingCoursesStatistics(id, {}, (res) => {
      this.info = { ...this.formViewData.params, ...res }
    })
  }
}
</script>
<style lang="less" scoped>
.title {
  font-size: 26px;
  color: #333333;
  font-weight: 700;
}
.activeInfo {
  display: flex;
  justify-content: space-between;
  .activeInfoItem {
    width: 33%;
    height: 100px;
    padding: 10px 0;
    margin: 20px 0;
    text-align: center;
    border-radius: 5px;
    background: rgba(242, 242, 242, 1);
  }
  p {
    color: #333333;
    font-weight: 400;
  }
}
</style>
